package com.work8;

import java.util.Objects;

public class Person {
    private int idCard;
    private String userName;

    public Person(int i, String zhaoliu) {
        this.idCard = i;
        this.userName = zhaoliu;
    }

    // 以下是getter和setter/toString/构造方法，省略
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return idCard == person.idCard && Objects.equals(userName, person.userName);
    }
    public int hashCode() {
        return 0;
    }
}
